TalentSync

AI resume builder and ATS optimizer for job seekers. Tailored resumes, outreach, and interview prep from one profile.

Frontend integration and display

How the frontend calls resume analysis and renders the results.

  • PDF resume components: ConfigurationForm, ResumePreview, ExportTab, TailoringForm, LatexOutput, LoadingOverlay, and PageLoader
  • Hook-based integration via use-resume-editor.ts for real-time updates and state management
  • Resume service layer for API communication, error handling, and data transformation
  • ResumeEditor component architecture with form validation, section management, and live preview
  • ResumePreview panel rendering formatted analysis results with responsive design
  • Integration patterns for displaying analysis data, handling loading states, and managing user interactions
  • Accessibility and cross-browser considerations for PDF rendering

Repository layout#

The frontend integrates two major flows:

  • PDF resume generation and export (ExportTab orchestrating TailoringForm, ConfigurationForm, ResumePreview, LatexOutput, and LoadingOverlay)
  • Resume editor and live preview (ResumeEditorTab, ResumeForm, EditorLayout, ResumePreviewPanel, SectionHeader)

Building blocks#

  • ExportTab orchestrates resume tailoring, configuration, preview, and export (PDF or LaTeX). It manages state for tailoring parameters, template and style options, and parsed resume data.
  • TailoringForm toggles and collects job-specific parameters to tailor the resume.
  • ConfigurationForm controls template, color scheme, and font size for PDF/LaTeX output.
  • ResumePreview renders a formatted preview of the parsed resume data.
  • LatexOutput displays generated LaTeX code with copy and Open in Overleaf actions.
  • LoadingOverlay provides animated feedback during generation.
  • PageLoader shows a page-level spinner while the generator initializes.
  • ResumeEditorTab manages editing lifecycle, local drafts, and saving changes to the backend.
  • ResumeForm and EditorLayout implement drag-and-drop reordering, expand/collapse, and visibility toggles.
  • ResumePreviewPanel renders a printable A4-style preview with responsive scaling.

How it fits together#

The system follows a layered architecture:

  • UI Layer: Components for PDF export and resume editing
  • Service Layer: resume.service.ts encapsulates API calls via api-client.ts
  • State Management: TanStack Query mutations in use-resume-editor.ts manage backend state
  • Types: Strongly typed ResumeData and related interfaces define data contracts

PDF resume export tab#

ExportTab coordinates tailoring, configuration, preview, and export. It:

  • Builds FormData for tailoring parameters and calls tailorResume mutation
  • Generates LaTeX or downloads PDF using resume service
  • Manages loading states with LoadingOverlay
  • Displays parsed data in ResumePreview and LaTeX output in LatexOutput

Tailoring form#

TailoringForm toggles job-specific customization and validates required fields. It:

  • Uses a Switch to enable/disable tailoring
  • Requires job role when tailoring is enabled
  • Collects company info and job description for improved tailoring

Configuration form#

ConfigurationForm controls:

  • Template selection (Professional/Modern)
  • Color scheme (Default/Blue/Green/Red)
  • Font size slider (8-12pt)

Resume preview panel#

ResumePreview renders formatted sections:

  • Personal info with links
  • Education, Skills, Languages
  • Work experience with bullet points
  • Projects with technologies and links
  • Publications, Certifications, Achievements
  • Positions of responsibility
  • Recommended roles

There is also a miniature A4-style preview with responsive scaling and live updates.

LaTeX output#

LatexOutput displays generated LaTeX code :

  • Copy to clipboard
  • Open in Overleaf
  • Step-by-step manual compilation instructions

Loading and page load states#

  • LoadingOverlay animates during PDF/LaTeX generation
  • PageLoader shows a page-level spinner while initializing

Resume editor integration#

ResumeEditorTab manages:

  • Local drafts persisted to localStorage with auto-save debounce
  • Real-time sync with server data and change detection
  • Save/discard actions with mutation feedback
  • Integration with useUpdateResumeAnalysis for backend updates

Service layer and API communication#

The service layer abstracts API calls:

  • resume.service.ts defines endpoints for resume CRUD and analysis updates
  • api-client.ts centralizes HTTP requests, error normalization, and FormData handling

Data models and interfaces#

ResumeData and related types define the shape of analysis results and export options.

Dependencies#

  • ExportTab depends on TailoringForm, ConfigurationForm, ResumePreview, LatexOutput, and TanStack Query mutations for PDF/LaTeX generation and download
  • ResumeEditorTab depends on useUpdateResumeAnalysis and TanStack Query for saving changes
  • Both flows depend on resume.service.ts and api-client.ts for backend communication
  • Types define contracts across components and services

Performance#

  • Debounced localStorage writes in ResumeEditorTab reduce storage churn and improve responsiveness
  • ResumePreviewPanel scales content to fit available width using ResizeObserver and CSS transforms
  • TanStack Query invalidations keep cached data fresh after edits
  • ExportTab batches UI updates and uses a single overlay for generation feedback

[No sources needed since this section provides general guidance]

Troubleshooting#

Common issues and remedies:

  • PDF generation fails with fallback LaTeX: ExportTab checks for fallback and shows LaTeX output; copy and compile manually
  • Network errors: api-client.ts throws ApiError with normalized messages; surface via toasts
  • Tailoring validation: ExportTab enforces required job role when tailoring is enabled
  • Save conflicts: ResumeEditorTab detects changes and clears drafts upon successful save

Appendix#

Accessibility considerations#

  • Use semantic labels and ARIA-friendly components (e.g., Switch, Button, Select)
  • Keep keyboard navigation working for drag-and-drop and form controls
  • Provide visible focus states and sufficient color contrast for print-like previews
  • Offer alternative actions (copy LaTeX, open in Overleaf) for users who cannot download PDF

[No sources needed since this section provides general guidance]

Cross-Browser compatibility for PDF rendering#

  • Prefer server-side PDF generation for consistent rendering across browsers
  • Use LaTeX as a fallback for environments where PDF generation is unavailable
  • Validate blob handling and download triggers across browsers
  • Test link behavior for external services (Overleaf) and allow pop-ups where needed

[No sources needed since this section provides general guidance]